# # 数据库的模型
# from peewee import *
# from database import db
#
#
# class BaseModel(Model):
#     class Meta:
#         database = db
#
#
# class TempBusinessSystemResourceUsed(BaseModel):
#     "业务系统资源使用情况临时表"
#     bare_metal_num = IntegerField(null=True, verbose_name="裸金属数量")
#     business_system_name = CharField(null=True, verbose_name="业务系统名称")
#     create_time = DateTimeField(null=True, verbose_name="创建时间")
#     create_user = BigIntegerField(null=True, verbose_name="创建人")
#     is_deleted = IntegerField(constraints=[SQL("DEFAULT 0")], null=True, verbose_name="是否删除")
#     organization_name = CharField(null=True, verbose_name="组织名称")
#     remark = CharField(null=True, verbose_name="备注")
#     tenant_id = BigIntegerField(null=True, verbose_name="租户id")
#     update_time = DateTimeField(null=True, verbose_name="更新时间")
#     update_user = BigIntegerField(null=True, verbose_name="更新人")
#     virtual_machine_num = IntegerField(null=True, verbose_name="虚拟机数量")
#
#     class Meta:
#         table_name = 'temp_business_system_resource_used'
#
#
# class TempCloudDataCenter(BaseModel):
#     cdc_name = CharField(null=True, verbose_name="云数据中心名称")
#     cpu_rate = FloatField(null=True, verbose_name="cpu百分比")
#     cpu_total = FloatField(null=True, verbose_name="cpu总量")
#     cpu_used = FloatField(null=True, verbose_name="cpu已用")
#     create_time = DateTimeField(null=True, verbose_name="创建时间")
#     create_user = BigIntegerField(null=True, verbose_name="创建用户")
#     is_deleted = IntegerField(constraints=[SQL("DEFAULT 0")], null=True, verbose_name="是否删除")
#     memory_rate = FloatField(null=True, verbose_name="内存使用百分比")
#     memory_total = FloatField(null=True, verbose_name="内存总量")
#     memory_used = FloatField(null=True)
#     remark = CharField(null=True)
#     sort = IntegerField()
#     storage_rate = FloatField(null=True)
#     storage_total = FloatField(null=True)
#     storage_used = FloatField(null=True)
#     tenant_id = BigIntegerField(null=True, verbose_name="租户id")
#     update_time = DateTimeField(null=True)
#     update_user = BigIntegerField(null=True)
#
#     class Meta:
#         table_name = 'temp_cloud_data_center'
#         indexes = (
#             (('id', 'sort'), True),
#         )
#         primary_key = CompositeKey('id', 'sort')
#
#
# class TempCloudServerProvideStatistics(BaseModel):
#     create_time = DateTimeField(null=True)
#     create_user = BigIntegerField(null=True)
#     data_name = CharField(null=True)
#     data_num = IntegerField(null=True)
#     data_type = IntegerField(null=True)
#     id = BigAutoField()
#     is_deleted = IntegerField(constraints=[SQL("DEFAULT 0")], null=True)
#     remark = CharField(null=True)
#     tenant_id = BigIntegerField(null=True)
#     update_time = DateTimeField(null=True)
#     update_user = BigIntegerField(null=True)
#
#     class Meta:
#         table_name = 'temp_cloud_server_provide_statistics'
#
#
# class TempDataCenterResourceOverview(BaseModel):
#     bare_metal_server_num = IntegerField(null=True)
#     create_time = DateTimeField(null=True)
#     create_user = BigIntegerField(null=True)
#     firewall_num = IntegerField(null=True)
#     id = BigAutoField()
#     is_deleted = IntegerField(constraints=[SQL("DEFAULT 0")], null=True)
#     load_equipment_num = IntegerField(null=True)
#     management_server_num = IntegerField(null=True)
#     remark = CharField(null=True)
#     router_num = IntegerField(null=True)
#     storage_server_num = IntegerField(null=True)
#     switch_num = IntegerField(null=True)
#     tenant_id = BigIntegerField(null=True)
#     update_time = DateTimeField(null=True)
#     update_user = BigIntegerField(null=True)
#     virtual_server_num = IntegerField(null=True)
#
#     class Meta:
#         table_name = 'temp_data_center_resource_overview'
#
#
# class TempElasticEcsStatus(BaseModel):
#     create_medium_num = IntegerField(null=True)
#     create_time = DateTimeField(null=True)
#     create_user = CharField(null=True)
#     has_ceased_num = IntegerField(null=True)
#     id = BigAutoField()
#     in_operation_num = IntegerField(null=True)
#     is_deleted = IntegerField(constraints=[SQL("DEFAULT 0")], null=True)
#     tenant_id = BigIntegerField(null=True)
#     update_time = DateTimeField(null=True)
#     update_user = CharField(null=True)
#
#     class Meta:
#         table_name = 'temp_elastic_ecs_status'
#
#
# class TempGetPlatformHealth(BaseModel):
#     alarm_disposal_rate = FloatField(null=True)
#     comprehensive_evaluation = FloatField(null=True)
#     cpu_used = FloatField(null=True)
#     create_time = DateTimeField(null=True)
#     create_user = BigIntegerField(null=True)
#     id = BigAutoField()
#     idle_rate = FloatField(null=True)
#     is_deleted = IntegerField(constraints=[SQL("DEFAULT 0")], null=True)
#     memory_used = FloatField(null=True)
#     remark = CharField(null=True)
#     storage_used = FloatField(null=True)
#     tenant_id = BigIntegerField(null=True)
#     update_time = DateTimeField(null=True)
#     update_user = BigIntegerField(null=True)
#
#     class Meta:
#         table_name = 'temp_get_platform_health'
#
#
# class TempGlobalResource(BaseModel):
#     application_num = IntegerField(null=True)
#     cpu_rate = FloatField(null=True)
#     cpu_total = FloatField(null=True)
#     cpu_used = FloatField(null=True)
#     create_time = DateTimeField(null=True)
#     create_user = BigIntegerField(null=True)
#     id = BigAutoField()
#     is_deleted = IntegerField(constraints=[SQL("DEFAULT 0")], null=True)
#     memory_rate = FloatField(null=True)
#     memory_total = FloatField(null=True)
#     memory_used = FloatField(null=True)
#     organization_num = IntegerField(null=True)
#     remark = CharField(null=True)
#     storage_rate = FloatField(null=True)
#     storage_total = FloatField(null=True)
#     storage_used = FloatField(null=True)
#     tenant_id = BigIntegerField(null=True)
#     update_time = DateTimeField(null=True)
#     update_user = BigIntegerField(null=True)
#     vdc_num = IntegerField(null=True)
#
#     class Meta:
#         table_name = 'temp_global_resource'
#
#
# class TempGroupOrganizationResourceUsed(BaseModel):
#     bare_metal_usage_rate = FloatField(null=True)
#     bare_metal_used = IntegerField(null=True)
#     create_time = DateTimeField(null=True)
#     create_user = BigIntegerField(null=True)
#     id = BigAutoField()
#     is_deleted = IntegerField(constraints=[SQL("DEFAULT 0")], null=True)
#     organization_name = CharField(null=True)
#     remark = CharField(null=True)
#     storage_usage_rate = FloatField(null=True)
#     storage_used = IntegerField(null=True)
#     tenant_id = BigIntegerField(null=True)
#     update_time = DateTimeField(null=True)
#     update_user = BigIntegerField(null=True)
#     virtual_machine_used = IntegerField(null=True)
#     virtual_machinel_usage_rate = FloatField(null=True)
#
#     class Meta:
#         table_name = 'temp_group_organization_resource_used'
#
#
# class TempHostResourceUsed(BaseModel):
#     cpu_rate = FloatField(null=True)
#     cpu_total = FloatField(null=True)
#     cpu_used = FloatField(null=True)
#     create_time = DateTimeField(null=True)
#     create_user = BigIntegerField(null=True)
#     host_name = CharField(null=True)
#     id = BigAutoField()
#     is_deleted = IntegerField(constraints=[SQL("DEFAULT 0")], null=True)
#     memory_rate = FloatField(null=True)
#     memory_total = FloatField(null=True)
#     memory_used = FloatField(null=True)
#     remark = CharField(null=True)
#     tenant_id = BigIntegerField(null=True)
#     update_time = DateTimeField(null=True)
#     update_user = BigIntegerField(null=True)
#
#     class Meta:
#         table_name = 'temp_host_resource_used'
#
#
# class TempHuaweiCloudAlarm(BaseModel):
#     alarm_content = CharField(null=True)
#     alarm_level = CharField(null=True)
#     create_time = DateTimeField(null=True)
#     create_user = BigIntegerField(null=True)
#     event_time = DateTimeField(null=True)
#     id = BigAutoField()
#     is_deleted = IntegerField(constraints=[SQL("DEFAULT 0")], null=True)
#     me_name = CharField(null=True)
#     remark = CharField(null=True)
#     tenant_id = BigIntegerField(null=True)
#     update_time = DateTimeField(null=True)
#     update_user = BigIntegerField(null=True)
#     visible = CharField(null=True)
#
#     class Meta:
#         table_name = 'temp_huawei_cloud_alarm'
#
#
# class TempHuaweiCloudSecurityCloudAlertCondition(BaseModel):
#     alert_level = IntegerField(null=True)
#     alert_num = IntegerField(null=True)
#     create_time = DateTimeField(null=True)
#     create_user = BigIntegerField(null=True)
#     dispose_num = IntegerField(null=True)
#     id = BigAutoField()
#     is_deleted = IntegerField(constraints=[SQL("DEFAULT 0")], null=True)
#     remark = CharField(null=True)
#     tenant_id = BigIntegerField(null=True)
#     type = CharField(null=True)
#     update_time = DateTimeField(null=True)
#     update_user = BigIntegerField(null=True)
#
#     class Meta:
#         table_name = 'temp_huawei_cloud_security_cloud_alert_condition'
#
#
# class TempLargeScreenStaticDataBackup(BaseModel):
#     chengtou_jituan_storage_used = IntegerField(null=True)
#     chengtou_shuiwu_storage_used = IntegerField(null=True)
#     file_storage_num = FloatField()
#     file_storage_used_num = FloatField(null=True)
#     id = BigAutoField()
#     object_storage_num = FloatField()
#     object_storage_used_num = FloatField(null=True)
#
#     class Meta:
#         table_name = 'temp_large_screen_static_data_backup'
#
#
# class TempSecurityCloudSecurityEventOverview(BaseModel):
#     create_time = DateTimeField(null=True)
#     create_user = BigIntegerField(null=True)
#     event_content = CharField(null=True)
#     event_impact = CharField(null=True)
#     event_time = DateTimeField(null=True)
#     id = BigAutoField()
#     is_deleted = IntegerField(constraints=[SQL("DEFAULT 0")], null=True)
#     level = CharField(null=True)
#     remark = CharField(null=True)
#     tenant_id = BigIntegerField(null=True)
#     type = CharField(null=True)
#     update_time = DateTimeField(null=True)
#     update_user = BigIntegerField(null=True)
#
#     class Meta:
#         table_name = 'temp_security_cloud_security_event_overview'
#
#
# class TempSecurityCloudSecurityResourceOverview(BaseModel):
#     business_num = IntegerField(null=True)
#     create_time = DateTimeField(null=True)
#     create_user = BigIntegerField(null=True)
#     id = BigAutoField()
#     is_deleted = IntegerField(constraints=[SQL("DEFAULT 0")], null=True)
#     level_three_compliance_num = IntegerField(null=True)
#     level_two_compliance_num = IntegerField(null=True)
#     protection_day_num = IntegerField(null=True)
#     remark = CharField(null=True)
#     security_event_business_num = IntegerField(null=True)
#     tenant_id = BigIntegerField(null=True)
#     update_time = DateTimeField(null=True)
#     update_user = BigIntegerField(null=True)
#     user_num = IntegerField(null=True)
#
#     class Meta:
#         table_name = 'temp_security_cloud_security_resource_overview'
#
#
# class TempSecurityCloudThirtyDaysDisposedEvent(BaseModel):
#     create_time = DateTimeField(null=True)
#     create_user = BigIntegerField(null=True)
#     dispose_time = DateTimeField(null=True)
#     dispose_user_id = BigIntegerField(null=True)
#     dispose_user_name = CharField(null=True)
#     event_count = BigIntegerField(null=True)
#     event_name = CharField(null=True)
#     event_time = DateTimeField(null=True)
#     event_type = CharField(null=True)
#     id = BigAutoField()
#     is_deleted = IntegerField(constraints=[SQL("DEFAULT 0")], null=True)
#     remark = CharField(null=True)
#     tenant_id = BigIntegerField(null=True)
#     update_time = DateTimeField(null=True)
#     update_user = BigIntegerField(null=True)
#
#     class Meta:
#         table_name = 'temp_security_cloud_thirty_days_disposed_event'
# from db.session import db
# from models.items import Items
# from models.users import Users
#
# db.connect()
# db.create_tables([Items, Users])
# db.close()